Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waypoints 0.05: implement goto functionality #3659

Merged
merged 12 commits into from
Nov 20, 2024

Conversation

pavelmachek
Copy link
Contributor

Update libraries, refactor and implement goto functionality

Copy link
Collaborator

@bobrippling bobrippling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, two minor suggestions

"" : {title : "Select WP"},
"< Back" : mainMenu
};
if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is wp always an array? If so we could:

Suggested change
if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""});
if (wp.length==0) Object.assign(menu, {"No WPs":""});

if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""});
else {
wp.forEach((val, card) => {
const name = wp[card].name;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we could save a bit of code:

Suggested change
const name = wp[card].name;
const name = val.name;

@pavelmachek
Copy link
Contributor Author

Yeah, there's ton more optimalizations/cleanups that could be done. I'd prefer this to be applied, then I can take your patches as a separate commit, do more work on top of that, and submit it as new version after some testing?

@bobrippling
Copy link
Collaborator

Not a problem, that sounds like a plan :)

@bobrippling bobrippling merged commit 4d4fe0f into espruino:master Nov 20, 2024
1 check passed
@pavelmachek
Copy link
Contributor Author

Thank you, it makes my patch flow easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants